using System;
using System.Collections;
using System.Collections.Generic;
namespace DalatCooking.Core
{
    public abstract class IPersonRepository
    {
        public abstract bool Insert(Person entity);
        public abstract bool Update(Person entity);
        public abstract bool Delete(Person entity);
        public abstract bool Delete(int id);
        public abstract List<Person> FindAll();
        public abstract Person FindById(int id);
        public abstract Person Single(int id);
        public abstract Person Login(string userName, string password);
        public abstract Person LoginEmail(string email, string password);
        public abstract bool ChangePassword(Person entity);
        public abstract bool ResetPassword(Person entity);
        public abstract Person FindByUserName(string name);
        public abstract Person FindByEmail(string email);
        public abstract List<Person> PagingSql(int pageSize, int pageNum, out int totalRowCount);
        public abstract List<Person> PagingLinq(int pageSize, int pageNum, out int totalRowCount);
        public abstract bool SetActive(int id);
        public abstract bool SetSortIndex(int id, int isup);
        public abstract bool RemoveSelectedItem(int id);
        public abstract bool RemoveAll();
        public abstract bool RestoreSelectedItem(int id);
        public abstract bool RestoreAll();

        public abstract ArrayList FindAllPersonRoles(int personID);
        public abstract List<Role> FindAllRolesById(int personID);
        public abstract bool Person_AddRole(int personId,int roleId);
        public abstract bool Person_RemoveRole(int personId, int roleId);
        public abstract List<Person> FindAllMembers(int pageSize, int pageNum, out int totalRowCount);
    }
}